import { BasicPageParams, BasicFetchResult } from '@/api/model/baseModel';

/**
 * 附件分类搜索
 */
export type CategoryListParams = {
  name?: string;
  pid?: number | string;
  all?: number | string;
  file_type?: number | string;
};

/**
 * 附件分类列表
 */
export interface CategoryListItem {
  id: number | string;
  pid: number;
  name: string;
  title: string;
  enname?: string;
  file_type?: number;
  create_time?: string;
  update_time?: string;
}

/**
 * 附件分类表单
 */
export type CategoryParams = {
  id?: number | string;
  config_tab_id?: number | string;
  title: string;
  menu_name: string;
  value: string;
  type?: number;
  sort?: number | string;
  status?: number;
  remarks?: string;
};

// 附件分类搜索
export type CategoryPageParams = BasicPageParams & CategoryListParams;
// 附件分类数据列表
export type CategoryPageListGetResultModel = BasicFetchResult<CategoryListItem>;

/**
 * 附件搜索
 */
export type FileListParams = {
  pid?: number | string;
};

/**
 * 附件列表
 */
export interface FileListItem {
  att_id: number | string;
  pid: number | string;
  file_type?: number | string;
  image_type?: number | string;
  real_name?: string;
  name?: string;
  att_dir?: string;
  satt_dir?: string;
  att_size?: number | string;
  att_type?: string;
  md5file?: string;
  module_type?: number | string;
  ip?: string;
  create_time?: string;
}

export type FileNameParams = {
  real_name: number | string;
};

export type FileParams = {
  ids?: number | string;
  pid?: number | string;
  images?: number | string;
};

// 附件搜索
export type FilePageParams = BasicPageParams & FileListParams;
// 附件数据列表
export type FilePageListGetResultModel = BasicFetchResult<FileListItem>;
